package com.lyf.service.impl;

import com.lyf.dao.EmployeeDao;
import com.lyf.dao.impl.EmployeeDaoImpl;
import com.lyf.pojo.Employee;
import com.lyf.service.EmployeeService;
import com.lyf.utils.PageModel;
import com.lyf.vo.CountVoByName;

import java.util.List;

public class EmployeeServiceImpl implements EmployeeService {
    EmployeeDao employeeDao = new EmployeeDaoImpl();
    @Override
    public void add(Employee employee) {
        employeeDao.add(employee);
    }

    @Override
    public void delete(Integer id) {
        employeeDao.delete(id);
    }

    @Override
    public void update(Employee employee) {
        employeeDao.update(employee);
    }

    @Override
    public void updateStatus(Integer status, Integer id) {
        employeeDao.updateStatus(status,id);
    }

    @Override
    public List<Employee> selectAll() {
        return null;
    }

    @Override
    public List<CountVoByName> selectCountByDeptId() {
        return employeeDao.selectCountByDeptId();
    }

    @Override
    public List<CountVoByName> selectCountByJobId() {
        return employeeDao.selectCountByJobId();
    }

    @Override
    public List<CountVoByName> selectCountBySpeciality() {
        return employeeDao.selectCountBySpeciality();
    }

    @Override
    public List<CountVoByName> selectCountByEducation() {
        return employeeDao.selectCountByEducation();
    }

    @Override
    public List<CountVoByName> selectCountByRace() {
        return employeeDao.selectCountByRace();
    }

    @Override
    public List<CountVoByName> selectCountByProvince() {
        return employeeDao.selectCountByProvince();
    }

    @Override
    public List<CountVoByName> selectCountByParty() {
        return employeeDao.selectCountByParty();
    }

    @Override
    public Employee selectById(Integer id) {
        return employeeDao.selectById(id);
    }

    @Override
    public Employee selectByname(String name) {
        return employeeDao.selectByname(name);
    }

    @Override
    public List<Employee> queryEmployee(Employee employee, PageModel model) {
        return employeeDao.queryEmployee(employee,model);
    }

    @Override
    public int getTotalEmployeeCount(Employee employee) {
        return employeeDao.getTotalEmployeeCount(employee);
    }
}
